package optimization;

import java.util.ArrayList;

/**
 * 
 * This Interface have to be implemented to integrate a new optimization
 * algorithm.
 * 
 * @author Kevin Wagner
 * @version 1.0
 * @param <T>
 *            Type of Result. For example double or double array
 */
public interface OptimizationI<T> {

	/**
	 * Initializes of the Optimization.
	 * 
	 * @return {@code true}, if initialization was successfully
	 */
	public boolean init();

	/**
	 * Performs the optimization.
	 * 
	 * @return {@code true}, if run was successfully
	 */
	public boolean perform();

	/**
	 * Returns the result(s) of the optimization.
	 * 
	 * @return result(s) of the optimization.
	 */
	public T getResults();

	/**
	 * Returns the parameters for the optimization.
	 * 
	 * @return parameters for the optimization
	 */
	public ArrayList<String> getParameters();

	/**
	 * Returns the formatted values of the parameters returned by the
	 * getParameters()-mehtod.
	 * 
	 * @return list of parameter values for the optimization
	 */
	public ArrayList<String> getParameterConfiguration();

	/**
	 * Returns the status of initialization
	 * 
	 * @return {@code true}, if the optimization is initialized, {@code false},
	 *         if not
	 */
	public boolean isInitialized();
	
	/**
	 * Returns the status of running optimization.
	 * 
	 * @return {@code true}, if the optimization is running, {@code false},
	 *         if not
	 */
	public boolean isRunning();

}
